using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using Yoozoo.UI;
public class TextMeshProUGUIBinderTreeItem : BindingBinderTreeItemBase
{
    public static Dictionary<TextMeshProUGUIBinder.AttributeType, LinkerValueState> AttributeValueDic = new Dictionary<TextMeshProUGUIBinder.AttributeType, LinkerValueState>
    {
        {TextMeshProUGUIBinder.AttributeType.text, LinkerValueState.String},
        {TextMeshProUGUIBinder.AttributeType.color, LinkerValueState.Color},
    };
    public TextMeshProUGUIBinderTreeItem() : base(typeof(TextMeshProUGUIBinder))
    {
    }
    
    public override void RebuildTree()
    {
        base.RebuildTree();
        foreach (TextMeshProUGUIBinder.AttributeType binderType in Enum.GetValues(typeof(TextMeshProUGUIBinder.AttributeType)))
        {
            BindingLinkerTreeItem linkerTreeItem = new BindingLinkerTreeItem(binderType.ToString(), binderType.ToString(), (int)AttributeValueDic[binderType]);
            AddChild(linkerTreeItem);
        }
    }
}